package sale.wxb.loveshopping.entity.vo.menu;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.PositiveOrZero;

@Getter
@Setter
public class SaveMenuVo {
    @ApiModelProperty("id")
    @PositiveOrZero
    private Long id;

    @ApiModelProperty(value = "菜单名称", required = true)
    @NotBlank
    private String name;

    @ApiModelProperty("上级菜单ID")
    @PositiveOrZero
    private Long parentId = 0L;

    @ApiModelProperty("排序")
    @PositiveOrZero
    private Integer sort = 0;

    @ApiModelProperty("图标")
    private String icon;

    @ApiModelProperty("是否启用")
    private Boolean enable = true;

    @ApiModelProperty("显示状态")
    private Boolean showStatus = true;

    @ApiModelProperty(value = "菜单类型 1 目录 2 菜单 3 按钮", required = true)
    @NotNull
    @Range(min = 1, max = 3)
    private Integer menuType;

    @ApiModelProperty(value = "前端路由 保存菜单时必填", notes = "保存菜单时必填")
    private String frontEndRouter;

    @ApiModelProperty(value = "前端组件路径", notes = "保存菜单时必填")
    private String componentPath;

    @ApiModelProperty(value = "权限标识 保存菜单或按钮时必填", notes = "保存菜单或按钮时必填")
    private String permission;
}
